switchroot: Fix split source/build directory
authorAlex Kiernan <alex.kiernan@gmail.com>
Sun, 4 Feb 2018 12:08:29 +0000 (12:08 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 5 Feb 2018 15:26:22 +0000 (15:26 +0000)
If you have split source and build directories, then building
static ostree-prepare-root fails to find the source files.

https://github.com/ostreedev/ostree/issues/1429

Closes: #1445
Approved by: cgwalters

Makefile-switchroot.am

index 6735c85ad1d9d158d575494a7db58b9d422997a4..8a8ec570f1e4f64728703bbd88a2aa8c6ea7c842 100644 (file)
@@ -45,7 +45,7 @@ if BUILDOPT_USE_STATIC_COMPILER
 ostree_boot_SCRIPTS = ostree-prepare-root
 
 ostree-prepare-root : $(ostree_prepare_root_SOURCES)
-       $(STATIC_COMPILER) -o $@ -static $(ostree_prepare_root_SOURCES) $(AM_CPPFLAGS) $(AM_CFLAGS) $(DEFAULT_INCLUDES)
+       $(STATIC_COMPILER) -o $@ -static $(top_srcdir)/src/switchroot/ostree-prepare-root.c $(AM_CPPFLAGS) $(AM_CFLAGS) $(DEFAULT_INCLUDES)
 else
 ostree_boot_PROGRAMS += ostree-prepare-root
 ostree_prepare_root_CFLAGS = $(AM_CFLAGS) -Isrc/switchroot